package chixing.day06;

public class LoanCustomer extends Customer {
    private double loanAmount;
    public LoanCustomer() {
        super();
        this.loanAmount = 0;
    }
    public LoanCustomer(String custName, double custbalance, double loanAmount) {
        super(custName, custbalance);
        this.loanAmount = loanAmount;
    }
    public boolean isEligibleForMoreLoan() {
        if(this.loanAmount < 2 * getCustbalance()) {
            return true;
        }
        else {
            return false;
        }
    }

    public double getLoanAmount() {
        return loanAmount;
    }

    public void setLoanAmount(double loanAmount) {
        this.loanAmount = loanAmount;
    }
}
